package com.kunag.builderFactory.demo1;

/**
 * @Title:
 * @Description:
 * 具体建造者：工人类
 * @Author: zx
 * @Date: create in 9:25 2020/8/4
 * @Version: 1.0
 */
public class Worker extends Builder {

    private Product product;

    public Worker() {
        this.product = new Product();
    }

    @Override
    void buildA() {
        product.setBuildA("地基");
        System.out.println("地基");
    }

    @Override
    void buildB() {
        product.setBuildB("钢精");
        System.out.println("钢精");
    }

    @Override
    void buildC() {
        product.setBuildC("水泥");
        System.out.println("水泥");
    }

    @Override
    void buildD() {
        product.setBuildD("粉刷");
        System.out.println("粉刷");
    }

    @Override
    Product getProduct() {
        return product;
    }
}
